package pattern;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @Author henry hu
 * @Date 2021/2/25 15:26
 */
public class RegexTest {
    public static void main(String[] args) {
        Pattern YEAR_PATTERN = Pattern.compile("\\d{4}");
        Matcher matcher = YEAR_PATTERN.matcher("1955");
        System.out.println(matcher.matches());
    }
}
